sdvaluematrix module

class sd.api.sdvaluematrix.SDValueMatrix(APIContext, handle, *args, **kwargs)

Bases: sd.api.sdvalue.SDValue

Class used to store the data of a matrix

getClassName() → str

Returns the most specific name of the class this APIObject is

getColumnCount() → int

Get the number of column of the matrix

getItem(columnIndex: int, rowIndex: int) → sd.api.sdvalue.SDValue

Get the value of the specified item

Parameters
  • columnIndex – The index of the column

  • rowIndex – The index of the row

getRowCount() → int

Get the number of row of the matrix

getType() → Optional[sd.api.sdtype.SDType]

Get the value type as string

release() → None

Releases an APIObject

static sNew(itemType: sd.api.sdtype.SDType, columnCount: int, rowCount: int) → sd.api.sdvaluematrix.SDValueMatrix

Create a new SDValueMatrix

Parameters
  • itemType – The type if the items of the matrix

  • columnCount – The number of the column of the new matrix

  • rowCount – The number of the row of the new matrix

static sNewFromSDTypeMatrix(sdTypeMatrix: sd.api.sdtypematrix.SDTypeMatrix) → sd.api.sdvaluematrix.SDValueMatrix

Create a new SDValueMatrix from a SDTypeMatrix

Parameters

sdTypeMatrix – The type of the new matrix

setItem(columnIndex: int, rowIndex: int, newItemValue: sd.api.sdvalue.SDValue) → None

Set the value of the specified item

Parameters
  • columnIndex – The index of the column

  • rowIndex – The index of the row

  • newItemValue – The new value of the item